Skip to main content

Send Template Message

AutomatR.WhatsApp.Activities.SendTemplateMessage

The "Send Template Message" activity in AutomatR is part of the WhatsApp activities package, providing the ability to send template messages via WhatsApp. This activity streamlines the process of sending predefined templates to a specific WhatsApp number.

Properties

NameDescription
Input
To WhatsApp NumberSpecifies the recipient's WhatsApp number to which the template message should be sent. WhatsApp Number with country code, Example: 85264318721. Required argument.
Template NameSpecifies the name of the pre-existing approved template to be used for the message. Required argument.
Broadcast NameSpecifies the broadcast name. Required argument.
ParametersSpecifies one or more objects that can be part of the body of the template message with their values. Required argument. Format: Dictionary<string, string>.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Send Template Message" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResponseReturns the response from the WhatsApp service. Variables of type SendTemplateMessageResponse to store the operation result.

How to use:

  1. Drag and drop the "Send Template Message" activity onto the workflow.
  2. Configure the properties by specifying the WhatsApp number, template name, broadcast name, and parameters for the template message.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to send the specified template message to the designated WhatsApp number.

Example: Consider an example where the "Send Template Message" activity is used to send a template message to a WhatsApp number "85264318721":

Send Template Message:
Display Name: "Send Welcome Message"
To WhatsApp Number: "85264318721"
Template Name: "WelcomeTemplate"
Broadcast Name: "GeneralBroadcast"
Parameters: {"Name": "John", "Product": "AutomatR"}
Response: templateMessageResponse

In this example, the activity sends the "WelcomeTemplate" message to the WhatsApp number "85264318721" with parameters {"Name": "John", "Product": "AutomatR"}. The response is stored in the templateMessageResponse variable for further handling in the workflow.